package com.imesne.office.excel.model;

import org.apache.poi.ss.usermodel.Cell;

/**
 * Created by liyd on 17/7/3.
 */
public class ExcelCell extends ExcelProperties {

    private Cell cell;

    /**
     * 列号
     */
    private Integer cellNum;

    /**
     * 列宽
     */
    private Integer width;

    /**
     * 值
     */
    private Object value;

    public String getStringValue() {
        return value == null ? "" : value.toString();
    }


    @Override
    public String toString() {
        if (this.value != null) {
            return value.toString();
        }
        return "null";
    }

    public Cell getCell() {
        return cell;
    }

    public void setCell(Cell cell) {
        this.cell = cell;
    }

    public Integer getCellNum() {
        return cellNum;
    }

    public void setCellNum(Integer cellNum) {
        this.cellNum = cellNum;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }

    public Integer getWidth() {
        return width;
    }

    public void setWidth(Integer width) {
        this.width = width;
    }
}
